<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>用户登录界面</title>
    <link href="../static/css/bootstrap.min.css" rel="stylesheet">
    <link href="../static/css/signin.css" rel="stylesheet">
    <style>
        .error-message {
            color: red;
            margin-bottom: 10px;
        }
    </style>
</head>
<body class="text-center">
<form class="form-signin" action="#" th:action="@{/login}" th:object="${user}" method="post">
    <p th:if="${error}" class="error-message" th:text="${error}"></p>
    <img class="mb-4" src="/static/img/login.jpg" width="72" height="72">
    <h1 class="h3 mb-3 font-weight-normal">请登录</h1>
    <input type="text" class="form-control" th:field="*{username}"
           placeholder="用户名" required="" autofocus="">
    <input type="password" class="form-control" th:field="*{password}"
           placeholder="密码" required="">
    <div class="checkbox mb-3">
        <label>
            <input type="checkbox" value="remember-me"> 记住我
        </label>
    </div>
    <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
    <p class="mt-5 mb-3 text-muted">© <span>2018</span>-<span>2019</span></p>
</form>
</body>
</html>